# Maintainer: T.J. Townsend <blakkheim@archlinux.org>

pkgbase=nerd-fonts
pkgname=(otf-aurulent-nerd
         otf-codenewroman-nerd
         otf-comicshanns-nerd
         otf-commit-mono-nerd
         otf-droid-nerd
         otf-firamono-nerd
         otf-geist-mono-nerd
         otf-hasklig-nerd
         otf-hermit-nerd
         otf-monaspace-nerd
         otf-opendyslexic-nerd
         otf-overpass-nerd
         ttf-0xproto-nerd
         ttf-3270-nerd
         ttf-agave-nerd
         ttf-anonymouspro-nerd
         ttf-arimo-nerd
         ttf-bigblueterminal-nerd
         ttf-bitstream-vera-mono-nerd
         ttf-cascadia-code-nerd
         ttf-cascadia-mono-nerd
         ttf-cousine-nerd
         ttf-d2coding-nerd
         ttf-daddytime-mono-nerd
         ttf-dejavu-nerd
         ttf-envycoder-nerd
         ttf-fantasque-nerd
         ttf-firacode-nerd
         ttf-go-nerd
         ttf-hack-nerd
         ttf-heavydata-nerd
         ttf-iawriter-nerd
         ttf-ibmplex-mono-nerd
         ttf-inconsolata-go-nerd
         ttf-inconsolata-lgc-nerd
         ttf-inconsolata-nerd
         ttf-intone-nerd
         ttf-iosevka-nerd
         ttf-iosevkaterm-nerd
         ttf-jetbrains-mono-nerd
         ttf-lekton-nerd
         ttf-liberation-mono-nerd
         ttf-lilex-nerd
         ttf-martian-mono-nerd
         ttf-meslo-nerd
         ttf-monofur-nerd
         ttf-monoid-nerd
         ttf-mononoki-nerd
         ttf-mplus-nerd
         ttf-noto-nerd
         ttf-profont-nerd
         ttf-proggyclean-nerd
         ttf-roboto-mono-nerd
         ttf-sharetech-mono-nerd
         ttf-sourcecodepro-nerd
         ttf-space-mono-nerd
         ttf-terminus-nerd
         ttf-tinos-nerd
         ttf-ubuntu-mono-nerd
         ttf-ubuntu-nerd
         ttf-victor-mono-nerd)
pkgdesc="Iconic font aggregator, collection, and patcher"
pkgver=3.1.1
pkgrel=1
arch=('any')
url='https://github.com/ryanoasis/nerd-fonts'
_urlbase="${url}/releases/download/v${pkgver}"
license=('MIT')
options=('!debug' '!strip')
provides=('ttf-font-nerd')
groups=('nerd-fonts')
source=("0xproto-${pkgver}.tar.xz::${_urlbase}/0xProto.tar.xz"
        "3270-${pkgver}.tar.xz::${_urlbase}/3270.tar.xz"
        "agave-${pkgver}.tar.xz::${_urlbase}/Agave.tar.xz"
        "anonymouspro-${pkgver}.tar.xz::${_urlbase}/AnonymousPro.tar.xz"
        "arimo-${pkgver}.tar.xz::${_urlbase}/Arimo.tar.xz"
        "aurulent-${pkgver}.tar.xz::${_urlbase}/AurulentSansMono.tar.xz"
        "bigblueterminal-${pkgver}.tar.xz::${_urlbase}/BigBlueTerminal.tar.xz"
        "bitstreamveramono-${pkgver}.tar.xz::${_urlbase}/BitstreamVeraSansMono.tar.xz"
        "cascadiacode-${pkgver}.tar.xz::${_urlbase}/CascadiaCode.tar.xz"
        "cascadiamono-${pkgver}.tar.xz::${_urlbase}/CascadiaMono.tar.xz"
        "codenewroman-${pkgver}.tar.xz::${_urlbase}/CodeNewRoman.tar.xz"
        "comicshanns-${pkgver}.tar.xz::${_urlbase}/ComicShannsMono.tar.xz"
        "commitmono-${pkgver}.tar.xz::${_urlbase}/CommitMono.tar.xz"
        "cousine-${pkgver}.tar.xz::${_urlbase}/Cousine.tar.xz"
        "daddytimemono-${pkgver}.tar.xz::${_urlbase}/DaddyTimeMono.tar.xz"
        "d2coding-${pkgver}.tar.xz::${_urlbase}/D2Coding.tar.xz"
        "dejavu-${pkgver}.tar.xz::${_urlbase}/DejavuSansMono.tar.xz"
        "droid-${pkgver}.tar.xz::${_urlbase}/DroidSansMono.tar.xz"
        "envycoder-${pkgver}.tar.xz::${_urlbase}/EnvyCodeR.tar.xz"
        "fantasque-${pkgver}.tar.xz::${_urlbase}/FantasqueSansMono.tar.xz"
        "fira-${pkgver}.tar.xz::${_urlbase}/FiraCode.tar.xz"
        "firamono-${pkgver}.tar.xz::${_urlbase}/FiraMono.tar.xz"
        "geistmono-${pkgver}.tar.xz::${_urlbase}/GeistMono.tar.xz"
        "go-${pkgver}.tar.xz::${_urlbase}/Go-Mono.tar.xz"
        "hack-${pkgver}.tar.xz::${_urlbase}/Hack.tar.xz"
        "hasklig-${pkgver}.tar.xz::${_urlbase}/Hasklig.tar.xz"
        "heavydata-${pkgver}.tar.xz::${_urlbase}/HeavyData.tar.xz"
        "hermit-${pkgver}.tar.xz::${_urlbase}/Hermit.tar.xz"
        "iawriter-${pkgver}.tar.xz::${_urlbase}/iA-Writer.tar.xz"
        "ibmplexmono-${pkgver}.tar.xz::${_urlbase}/IBMPlexMono.tar.xz"
        "inconsolata-${pkgver}.tar.xz::${_urlbase}/Inconsolata.tar.xz"
        "inconsolatago-${pkgver}.tar.xz::${_urlbase}/InconsolataGo.tar.xz"
        "inconsolatalgc-${pkgver}.tar.xz::${_urlbase}/InconsolataLGC.tar.xz"
        "intone-${pkgver}.tar.xz::${_urlbase}/IntelOneMono.tar.xz"
        "iosevka-${pkgver}.tar.xz::${_urlbase}/Iosevka.tar.xz"
        "iosevkaterm-${pkgver}.tar.xz::${_urlbase}/IosevkaTerm.tar.xz"
        "jetbrainsmono-${pkgver}.tar.xz::${_urlbase}/JetBrainsMono.tar.xz"
        "lekton-${pkgver}.tar.xz::${_urlbase}/Lekton.tar.xz"
        "liberationmono-${pkgver}.tar.xz::${_urlbase}/LiberationMono.tar.xz"
        "lilex-${pkgver}.tar.xz::${_urlbase}/Lilex.tar.xz"
        "martianmono-${pkgver}.tar.xz::${_urlbase}/MartianMono.tar.xz"
        "meslo-${pkgver}.tar.xz::${_urlbase}/Meslo.tar.xz"
        "monaspace-${pkgver}.tar.xz::${_urlbase}/Monaspace.tar.xz"
        "monofur-${pkgver}.tar.xz::${_urlbase}/Monofur.tar.xz"
        "monoid-${pkgver}.tar.xz::${_urlbase}/Monoid.tar.xz"
        "mononoki-${pkgver}.tar.xz::${_urlbase}/Mononoki.tar.xz"
        "mplus-${pkgver}.tar.xz::${_urlbase}/MPlus.tar.xz"
        "noto-${pkgver}.tar.xz::${_urlbase}/Noto.tar.xz"
        "opendyslexic-${pkgver}.tar.xz::${_urlbase}/OpenDyslexic.tar.xz"
        "overpass-${pkgver}.tar.xz::${_urlbase}/Overpass.tar.xz"
        "profont-${pkgver}.tar.xz::${_urlbase}/ProFont.tar.xz"
        "proggyclean-${pkgver}.tar.xz::${_urlbase}/ProggyClean.tar.xz"
        "robotomono-${pkgver}.tar.xz::${_urlbase}/RobotoMono.tar.xz"
        "sharetechmono-${pkgver}.tar.xz::${_urlbase}/ShareTechMono.tar.xz"
        "sourcecodepro-${pkgver}.tar.xz::${_urlbase}/SourceCodePro.tar.xz"
        "spacemono-${pkgver}.tar.xz::${_urlbase}/SpaceMono.tar.xz"
        "terminus-${pkgver}.tar.xz::${_urlbase}/Terminus.tar.xz"
        "tinos-${pkgver}.tar.xz::${_urlbase}/Tinos.tar.xz"
        "ubuntu-${pkgver}.tar.xz::${_urlbase}/Ubuntu.tar.xz"
        "ubuntumono-${pkgver}.tar.xz::${_urlbase}/UbuntuMono.tar.xz"
        "victormono-${pkgver}.tar.xz::${_urlbase}/VictorMono.tar.xz")
sha256sums=('4c69fe95a7e53feebef29e321d6ed4a4e0c91ad969d8f6ac8ccc66fc6f510528'
            '8c07d65ab0ae1d8f53598ffdf3513c3acbe8055e14fba9ee50a13f61e5e3ae39'
            'f9a93bcb1a773b48d2bfbe90d28417d3ae1fe13163e8da9cc3bc5a10be8d71aa'
            '7598e73dde3ff9f3e8b423c1a68aa42444cde1c058c1bb36d4db01ce3a476fda'
            'c76475ea8d6074e7fb030b5598c75a91cb385a6a8a3be18905356f6982afae11'
            '7c990f2650dc5bb0dbacfffea99c6acb61249e389c5bb38e1ec2981a7b0bf640'
            '81697e7a5fddc1a87e5bc650e0e000b075ac37a94f5855a542247ecde612b1f8'
            'cb5589d81c4987b57f58fc09953c0485b837a942f31bf3bfada3c684274b0b79'
            '6f5f72a9df47c4d96cc427c89a12c0c538b5873aa46c9e2d3df3306b7429bef4'
            'e5a0d7ade7f8d85ed55dea69123598646efe7b45955e283c279197b5a9a0c884'
            'b0bff94693b6b96a8d46217c7aa00f0e16be76e06fc5ee7571e52400939346ae'
            '8e2c61c32e927d638198c9bfb86489472c3fe3863968ce19fa312a0126b462b0'
            '000e052e6112aec08ae6f6a59bf668772f89046758941cca126ec9dfc8915601'
            'cac7df69dd48869f0267dcdec4b8da983f807cddebd8c28ff2217aaca049eaaa'
            '5ee75fdade9afb316e7478fe6aec6dedbc43b995b15a6c852d7aa055ee82b690'
            '42b66c2c74a4f99f5c069ddd26b3ac6829c85d4f54b857af269cbe1220c48a89'
            'af8d404d5da27e4eacb1f3b1bdd47b3c93e8f0171fdcaeaa291c3d3a24f5b5af'
            'c7e16faafb3f2b091d2cbed313d6a076d9cd09ac022d00fde27e6faee85c9d09'
            '02adc36ae601e5440e1bea86ce4415b2bf9bd028d393b64bb8db83789bafc47f'
            '6361c3e8637a74f115298448867e6062b280ca39b8e7b8a13bf51e8bec0e3adb'
            '8796ee138a6e7d81487cad381e619381c2ae99ac68d4223ca1a7d82089be38af'
            '22b294b02941242507b3e21ab5ebe9c114890a99de062aea94708cff53dbc23d'
            '01d249e0f572346fa5a734db27301a003cd94d75202c382be398c8c63b4a9025'
            '0587f4fa8a81d6b7057cb26d79ce4cee362992c8aa50c3d6aa67eda6f337240d'
            '0d820cb2fedb86a15ca1354e03f26443face8b6aa190610263fad1125a409a16'
            '1660ed492dbd3b17d6200c842176d59aeb048a354395952338523886b719e284'
            'e35a9cd2c2ba2eaa92e23b846c661113a1a0e3a35d1bf89d3baaa17991c4a0d6'
            'e19290ab05cc3556a78d1eb60e9e1a66bf79ea9de15cdd80c81af20603f7fd94'
            '3b32c018fe7c64437f03b2184283b1240ceb5bdd4c1183a16021c135c2b681bd'
            '6a1689743fc374080056284970b85524d4dd00d7d2e9a4114219d05aa360c728'
            '6f959d6e7a3de0de8c4c7006f20e7b48db470ec674b552a17f5d2d448345466e'
            '7d73416f36e8e4d5b18f566230afe7ed31666e4c653305781c38bd79a4041b5f'
            '95f7927af7833092b6c4fca898abf676bde454e409557804e2d5e7b29136b18f'
            '41f414b484318c3f67bb83b2709c1a148ad5d44348fd761e8a408b25d17ce41f'
            '4179d3fb8f38b16e3998eb69058deff641337a65364918790cc7e73b254da700'
            '4d555bf995c1c640afcc85d380d4536e538fbbb0cdb32b816c8ca4563da51203'
            '92225abcacf2fe500c59c5f16962528909a0c5caec8e2aa14a6546ff268a1db9'
            '104d0247ad985127f30edde5db44995e197bd4bf6593232ac96ffa0eb9cbf53b'
            'e1b6950a6f5e97d8bc210e4e379069dacc621552ae49f078675924b455a9d1bd'
            '5c543cb9de8eb5c79c2cdbd43d8f5bc07ddeefbb9ed2896ffe9a88fd90499058'
            'ee9cf10b84b62025e16904faf90f65f422d628317d410097e544bdfda66479ad'
            'd02d9b6e1f35a6bba424399203777b7cea6cbd5ccfded02b0be0393ae89fb598'
            '004b4e08b1c7d1a8a3a1bf990ef29969714521cdb7d7a07c45f229617f2ae876'
            'd6d81433a3b2f14733dd99770c644d9a4ea1fe58c8b016e3248e5c35bf5a13bc'
            '3b3caab2ba1db1d23ccba0926e6520d6bc13f79b1db0d834fb419a65c1725d39'
            '2810ad90817b7271f11a8ac7ab7441d117ba12173c07af08fa243be7b721fa83'
            '32e3a7d2fdbef070d90e841bb954156073ba2c2ecfb9e313a68337316f02b4e4'
            '71b0fc784ef69ac8f0f32649fc28d39c22ba5d5cda4045e4742457ded1647e01'
            '37d39caf9801bb68127cf29415ae83fcaf08aa48df26a3f433b8293eac3f5639'
            'd8e2aba3ee67ec0535e7ffeb63cd35f7c10265f13ab83ebd2f67ec106b92d146'
            '91a54bc07e7f0d82fc672792caaf78eacb0037f8d955fc0036523e453d8e0d51'
            'dbcdb3c9c76cfa6afd68cb8d719a3b19f4a08c847e076041b439755e7e3f4bf3'
            '270517ea79fb67bc241b71017e9ee775a1ea6e74a00352c76cd5010b958358cb'
            '446bd8e8cd96893abde784e53c32f31fe314eb7f7c75e2d85323f013ce47a08b'
            '13522f0de117f7dd52b55ef945b33a571fdd697ff6f8bcb5292993d7e593bd3a'
            '4ed0d82169ec3188696e88c12eb03db98e1e5ad1ca7a881a0c1400007666afc6'
            '4af85f352ca7af0f91c60794a10333d4df60c441bcd60c1d8071029d13a8344c'
            'dfbfae4b7f2541f5ce80503d0503ab7c6571b8a698c7d674ed76d2746d52e086'
            '75e0d25255b2b92cb7975442037fe707194ded123752a24cae092b0d2fc6a076'
            '4b187dc6d9f345b1d45f623fb3a451e0f602f20b53bc290915b3c6d4fc598c6a'
            'a2190c18b1fa4d99417859c8cff6d7151b4d967bb7b68550e6e82acef74112fa')
noextract=("${source[@]%%::*}")

prepare() {
  # archives don't include a font-specific directory, so we have to make them
  for _font in 3270 agave anonymouspro arimo aurulent bigblueterminal \
               bitstreamveramono cascadiacode codenewroman cousine \
               daddytimemono dejavu droid fantasque fira firamono go hack \
               hasklig heavydata hermit iawriter ibmplexmono inconsolata \
               inconsolatago inconsolatalgc iosevka jetbrainsmono lekton \
               liberationmono lilex meslo monofur monoid mononoki mplus noto \
               opendyslexic overpass profont proggyclean robotomono \
               sharetechmono sourcecodepro spacemono terminus tinos ubuntu \
               ubuntumono victormono iosevkaterm comicshanns intone 0xproto \
               cascadiamono commitmono d2coding envycoder geistmono martianmono \
               monaspace; do
  rm -rf ${_font}
  mkdir ${_font}
  bsdtar xf ${_font}-${pkgver}.tar.xz -C ${_font}
  done
}

package_ttf-arimo-nerd() {
  pkgdesc="Patched font Arimo from nerd fonts library"
  conflicts=(nerd-fonts-arimo)
  replaces=(nerd-fonts-arimo)

  install -Dm644 arimo/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 arimo/LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_otf-aurulent-nerd() {
  pkgdesc="Patched font Aurulent Sans Mono from nerd fonts library"

  install -Dm644 aurulent/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 aurulent/"SIL Open Font License.txt" \
          -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-firacode-nerd() {
  pkgdesc="Patched font Fira (Fura) Code from nerd fonts library"
  conflicts=(nerd-fonts-fira-code)
  replaces=(nerd-fonts-fira-code)

  install -Dm644 fira/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 fira/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_otf-firamono-nerd() {
  pkgdesc="Patched font Fira (Fura) Mono from nerd fonts library"
  conflicts=(nerd-fonts-fira-mono)
  replaces=(nerd-fonts-fira-mono)

  install -Dm644 firamono/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 firamono/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-hack-nerd() {
  pkgdesc="Patched font Hack from nerd fonts library"
  conflicts=(nerd-fonts-hack)
  replaces=(nerd-fonts-hack)

  install -Dm644 hack/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 hack/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-iosevka-nerd() {
  pkgdesc="Patched font Iosevka from nerd fonts library"
  conflicts=(nerd-fonts-iosevka)
  replaces=(nerd-fonts-iosevka)

  install -Dm644 iosevka/*.ttf -t "${pkgdir}"/usr/share/fonts/TTF/
  install -Dm644 iosevka/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-iosevkaterm-nerd() {
  pkgdesc="Patched font Iosevka Term from nerd fonts library"

  install -Dm644 iosevkaterm/*.ttf -t "${pkgdir}"/usr/share/fonts/TTF/
  install -Dm644 iosevkaterm/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-terminus-nerd() {
  pkgdesc="Patched font Terminus (Terminess) from nerd fonts library"
  conflicts=(nerd-fonts-terminus)
  replaces=(nerd-fonts-terminus)

  install -Dm644 terminus/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 terminus/LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-ubuntu-nerd() {
  pkgdesc="Patched font Ubuntu from nerd fonts library"
  conflicts=(nerd-fonts-ubuntu)
  replaces=(nerd-fonts-ubuntu)

  install -Dm644 ubuntu/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 ubuntu/LICENCE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-ubuntu-mono-nerd() {
  pkgdesc="Patched font Ubuntu Mono from nerd fonts library"
  conflicts=(nerd-fonts-ubuntu-mono ttf-ubuntumono-nerd)
  replaces=(nerd-fonts-ubuntu-mono ttf-ubuntumono-nerd)

  install -Dm644 ubuntumono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 ubuntumono/LICENCE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-0xproto-nerd() {
  pkgdesc="Patched font 0xProto from nerd fonts library"

  install -Dm644 0xproto/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 0xproto/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-3270-nerd() {
  pkgdesc="Patched font IBM 3270 from nerd fonts library"

  install -Dm644 3270/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 3270/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-agave-nerd() {
  pkgdesc="Patched font Agave from nerd fonts library"
  conflicts=(nerd-fonts-agave)
  replaces=(nerd-fonts-agave)

  install -Dm644 agave/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 agave/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-bigblueterminal-nerd() {
  pkgdesc="Patched font Big Blue Terminal from nerd fonts library"

  install -Dm644 bigblueterminal/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 bigblueterminal/LICENSE.TXT \
                    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT"
}

package_ttf-anonymouspro-nerd() {
  pkgdesc="Patched font Anonymous Pro (Anonymice) from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-anonymous-pro)
  replaces=(nerd-fonts-anonymous-pro)

  install -Dm644 anonymouspro/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 anonymouspro/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-bitstream-vera-mono-nerd() {
  pkgdesc="Patched font Bitstream Vera Mono from nerd fonts library"
  conflicts=(nerd-fonts-bitstream-vera-mono)
  replaces=(nerd-fonts-bitstream-vera-mono)

  install -Dm644 bitstreamveramono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 bitstreamveramono/"Bitstream Vera License.txt" \
          "${pkgdir}/usr/share/licenses/${pkgname}/Bitstream Vera License.txt"
}

package_ttf-cascadia-code-nerd() {
  pkgdesc="Patched font Cascadia Code (Caskaydia) from nerd fonts library"
  conflicts=(nerd-fonts-cascadia-code)
  replaces=(nerd-fonts-cascadia-code otf-cascadia-code-nerd)

  install -Dm644 cascadiacode/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 cascadiacode/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-cascadia-mono-nerd() {
  pkgdesc="Patched font Cascadia Mono (Caskaydia) from nerd fonts library"

  install -Dm644 cascadiamono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 cascadiamono/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_otf-codenewroman-nerd() {
  pkgdesc="Patched font Code New Roman from nerd fonts library"

  install -Dm644 codenewroman/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 codenewroman/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
}

package_otf-comicshanns-nerd() {
  pkgdesc="Patched font Comic Sans (Comic Shanns) from nerd fonts library"

  install -Dm644 comicshanns/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 comicshanns/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_otf-commit-mono-nerd() {
  pkgdesc="Patched font Commit Mono from nerd fonts library"

  install -Dm644 commitmono/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 commitmono/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-cousine-nerd() {
  pkgdesc="Patched font Cousine from nerd fonts library"

  install -Dm644 cousine/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 cousine/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-d2coding-nerd() {
  pkgdesc="Patched font D2Coding from nerd fonts library"

  install -Dm644 d2coding/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 d2coding/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-daddytime-mono-nerd() {
  pkgdesc="Patched font Daddy Time Mono from nerd fonts library"

  install -Dm644 daddytimemono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 daddytimemono/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-dejavu-nerd() {
  pkgdesc="Patched font Dejavu Sans Mono from nerd fonts library"
  conflicts=(nerd-fonts-dejavu-complete)
  replaces=(nerd-fonts-dejavu-complete)

  install -Dm644 dejavu/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 dejavu/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_otf-droid-nerd() {
  pkgdesc="Patched font Droid Sans Mono from nerd fonts library"
  conflicts=(nerd-fonts-droid-sans-mono)
  replaces=(nerd-fonts-droid-sans-mono)

  install -Dm644 droid/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 droid/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-envycoder-nerd() {
  pkgdesc="Patched font Envy Code R from nerd fonts library"

  install -Dm644 envycoder/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 envycoder/LICENCE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-fantasque-nerd() {
  pkgdesc="Patched font Fantasque Sans Mono from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-fantasque-sans-mono)
  replaces=(nerd-fonts-fantasque-sans-mono)

  install -Dm644 fantasque/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 fantasque/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_otf-geist-mono-nerd() {
  pkgdesc="Patched font Geist Mono from nerd fonts library"

  install -Dm644 geistmono/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 geistmono/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-go-nerd() {
  pkgdesc="Patched font Go Mono from nerd fonts library"
  conflicts=(nerd-fonts-go-mono)
  replaces=(nerd-fonts-go-mono)

  install -Dm644 go/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 go/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_otf-hasklig-nerd() {
  pkgdesc="Patched font Hasklig (Hasklug) from nerd fonts library"
  conflicts=(nerd-fonts-hasklig)
  replaces=(nerd-fonts-hasklig)

  install -Dm644 hasklig/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 hasklig/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-heavydata-nerd() {
  pkgdesc="Patched font Heavy Data from nerd fonts library"

  install -Dm644 heavydata/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 heavydata/"Vic Fieger License.txt" \
          "${pkgdir}/usr/share/licenses/${pkgname}/Vic Fieger License.txt"
}

package_otf-hermit-nerd() {
  pkgdesc="Patched font Hermit from nerd fonts library"
  conflicts=(nerd-fonts-hermit)
  replaces=(nerd-fonts-hermit)

  install -Dm644 hermit/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 hermit/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-iawriter-nerd() {
  pkgdesc="Patched font iA Writer (iM Writing) from nerd fonts library"

  install -Dm644 iawriter/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 iawriter/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-ibmplex-mono-nerd() {
  pkgdesc="Patched font IBM Plex Mono (Blex) from nerd fonts library"
  conflicts=(nerd-fonts-ibm-plex-mono)
  replaces=(nerd-fonts-ibm-plex-mono)

  install -Dm644 ibmplexmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 ibmplexmono/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-inconsolata-nerd() {
  pkgdesc="Patched font Inconsolata from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-inconsolata)
  replaces=(nerd-fonts-inconsolata)

  install -Dm644 inconsolata/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 inconsolata/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-inconsolata-go-nerd() {
  pkgdesc="Patched font Inconsolata Go from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-inconsolata-go)
  replaces=(nerd-fonts-inconsolata-go)

  install -Dm644 inconsolatago/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 inconsolatago/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-inconsolata-lgc-nerd() {
  pkgdesc="Patched font Inconsolata LGC from nerd fonts library"
  conflicts=(nerd-fonts-inconsolatalgc)
  replaces=(nerd-fonts-inconsolatalgc)

  install -Dm644 inconsolatalgc/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 inconsolatalgc/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-intone-nerd() {
  pkgdesc="Patched font Intone (Intel One) from nerd fonts library"

  install -Dm644 intone/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 intone/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-jetbrains-mono-nerd() {
  pkgdesc="Patched font JetBrains Mono from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-jetbrains-mono)
  replaces=(nerd-fonts-jetbrains-mono)

  install -Dm644 jetbrainsmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 jetbrainsmono/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-lekton-nerd() {
  pkgdesc="Patched font Lekton from nerd fonts library"

  install -Dm644 lekton/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 lekton/"SIL Open Font License.txt" \
          "${pkgdir}/usr/share/licenses/${pkgname}/SIL Open Font License.txt"
}

package_ttf-liberation-mono-nerd() {
  pkgdesc="Patched font Liberation Mono from nerd fonts library"
  conflicts=(nerd-fonts-liberation-mono)
  replaces=(nerd-fonts-liberation-mono)

  install -Dm644 liberationmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 liberationmono/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-lilex-nerd() {
  pkgdesc="Patched font Lilex from nerd fonts library"

  install -Dm644 lilex/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 lilex/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-martian-mono-nerd() {
  pkgdesc="Patched font Martian Mono from nerd fonts library"

  install -Dm644 martianmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 martianmono/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-meslo-nerd() {
  pkgdesc="Patched font Meslo LG from nerd fonts library"
  conflicts=(nerd-fonts-meslo)
  replaces=(nerd-fonts-meslo)

  install -Dm644 meslo/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 meslo/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_otf-monaspace-nerd() {
  pkgdesc="Patched font Monaspace (Monaspice) from nerd fonts library"

  install -Dm644 monaspace/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 monaspace/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-monofur-nerd() {
  pkgdesc="Patched font Monofur from nerd fonts library"
  conflicts=(nerd-fonts-monofur)
  replaces=(nerd-fonts-monofur)

  install -Dm644 monofur/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 monofur/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-monoid-nerd() {
  pkgdesc="Patched font Monoid from nerd fonts library"
  conflicts=(nerd-fonts-monoid)
  replaces=(nerd-fonts-monoid)

  install -Dm644 monoid/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 monoid/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-mononoki-nerd() {
  pkgdesc="Patched font Mononoki from nerd fonts library"
  conflicts=(nerd-fonts-mononoki)
  replaces=(nerd-fonts-mononoki)

  install -Dm644 mononoki/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 mononoki/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-mplus-nerd() {
  pkgdesc="Patched font MPlus from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-mplus)
  replaces=(nerd-fonts-mplus)

  install -Dm644 mplus/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 mplus/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-noto-nerd() {
  pkgdesc="Patched font Noto from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-noto)
  replaces=(nerd-fonts-noto)

  install -Dm644 noto/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 noto/LICENSE_OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE_OFL.txt"
}

package_otf-opendyslexic-nerd() {
  pkgdesc="Patched font OpenDyslexic from nerd fonts library"

  install -Dm644 opendyslexic/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 opendyslexic/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_otf-overpass-nerd() {
  pkgdesc="Patched font Overpass from nerd fonts library"
  conflicts=(nerd-fonts-overpass)
  replaces=(nerd-fonts-overpass)

  install -Dm644 overpass/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 overpass/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-profont-nerd() {
  pkgdesc="Patched font ProFont from nerd fonts library"
  conflicts=(nerd-fonts-profont)
  replaces=(nerd-fonts-profont)

  install -Dm644 profont/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 profont/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-proggyclean-nerd() {
  pkgdesc="Patched font ProggyClean from nerd fonts library"

  install -Dm644 proggyclean/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 proggyclean/Licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/Licence.txt"
}

package_ttf-roboto-mono-nerd() {
  pkgdesc="Patched font Roboto Mono from nerd fonts library"
  conflicts=(nerd-fonts-roboto-mono)
  replaces=(nerd-fonts-roboto-mono)

  install -Dm644 robotomono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 robotomono/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-sharetech-mono-nerd() {
  pkgdesc="Patched font Share Tech Mono (Shure Tech Mono) from nerd fonts library"
  license=('custom:OFL')

  install -Dm644 sharetechmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 sharetechmono/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-sourcecodepro-nerd() {
  pkgdesc="Patched font Source Code Pro from nerd fonts library"
  conflicts=(nerd-fonts-source-code-pro)
  replaces=(nerd-fonts-source-code-pro)

  install -Dm644 sourcecodepro/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 sourcecodepro/LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-space-mono-nerd() {
  pkgdesc="Patched font Space Mono from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-source-space-mono)
  replaces=(nerd-fonts-source-space-mono)

  install -Dm644 spacemono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 spacemono/OFL.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-tinos-nerd() {
  pkgdesc="Patched font Tinos from nerd fonts library"
  license=('Apache')
  conflicts=(nerd-fonts-source-tinos)
  replaces=(nerd-fonts-source-tinos)

  install -Dm644 tinos/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 tinos/"Apache License.txt" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-victor-mono-nerd() {
  pkgdesc="Patched font Victor Mono from nerd fonts library"
  conflicts=(ttf-nerd-fonts-victor-mono)
  replaces=(ttf-nerd-fonts-victor-mono)

  install -Dm644 victormono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 victormono/LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
